package com.chengccn.aop.aoptest.controller;

import com.chengccn.aop.aoptest.annontation.SysLog;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: Administrator
 * @Description: 测试Controller
 * @Date: 2019/5/15 10:27
 * @Version: 1.0
 */
@RestController
public class TestController {
    @Value("${test.name}")
    private String name;

    /**
     * 在这里加参数是为了测试增强方法中的获取参数
     * @param age
     * @return
     */
    @SysLog("测试注解")
    @GetMapping("get/{age}")
    public Object say(@PathVariable("age") int age) {
        return "name:" + name + "  age:" + age;
    }
}
